Versions:
Usage, published by jdx and currently available at version 5.0.0, is a specification and command-line tool for defining CLI tools in a standardized, declarative way. Functioning analogously to how OpenAPI (formerly Swagger) describes HTTP APIs, a Usage spec allows developers to define a command-line interface's arguments, flags, environment variables, and configuration files in a single specification, which then serves as a source of truth from which numerous artifacts can be generated. The software falls within the developer tools category, specifically targeting CLI development, documentation generation, and interface specification workflows. Its primary use cases include generating shell autocompletion scripts, producing markdown documentation, and creating man pages directly from the specification, eliminating the need to maintain these assets separately from the CLI's implementation. Additionally, Usage can generate type-safe SDK client libraries for TypeScript, Python, and Rust, enabling programmatic interaction with defined CLIs. It also functions as an advanced argument parser that can be leveraged in any programming language, decoupling argument-parsing logic from a particular framework or runtime. Another supported workflow is scaffolding: a single spec can be used to bootstrap the same CLI across different frameworks and even different languages, which is particularly valuable for teams porting tools or maintaining parallel implementations. A planned feature involves hosting CLI documentation on usage.sh, which would extend the specification's utility into published, browsable documentation. The catalog currently lists a single version, 5.0.0, of the software. Usage is suited to developers and engineering teams seeking consistency, maintainability, and automation in how their command-line tools are defined, documented, and consumed, consolidating what would otherwise be fragmented tooling for parsing, help text, completions, and SDK generation into one specification-driven approach.
Tags: